﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace HealthInsuranceMgm.Admin
{
    public partial class Page : System.Web.UI.MasterPage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if(Session["username"]==null){
                Response.Redirect("Login.aspx");
            }
            else if (Session["permission"]!=null)
            {
                if (Session["permission"].ToString()=="admin")
                {
                    panelLogoutADmin.Visible = true;
                    panelLogoutEmp.Visible = false;
                    menuAdmin.Visible = true;
                    panelEmp.Visible = false;
                    Panel1.Visible = true;
                    Panel2.Visible = false;
                }
                else if (Session["permission"].ToString() == "emp")
                {
                    panelLogoutADmin.Visible = false;
                    panelLogoutEmp.Visible = true;
                    panelEmp.Visible = true;
                    menuAdmin.Visible = false;
                    Panel1.Visible = false;
                    Panel2.Visible = true;
                }
            }

           
           
        }
    }
}